package org.p2psimulator.entity.overlaynetwork.routingtable;

import java.util.Vector;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.overlaynetwork.structures.ChordFingerRing;

public class ChordFingerTable  extends ChordRoutingTable <Id>{
   
    public ChordFingerTable(int M, Id owner) {
        super(M, new ChordFingerRing(M), owner);
    }
    public Vector<Id> getFingers() {
        return fingers.getNodes();
    }

    @Override
    public void insertNode(Id peer, Id value) {
        if (fingers.size() < M){
            fingers.insertNode(peer, value);
        }
    }
}


